from core.support import set_cutscene
from core.item import Item
from core.action import Action

class Rhett(Item):
    def __init__(self):
        Item.__init__(self, "Rhett")    # do basic initialization for every item
        
        # build list of actions
        # are we going to do a swipe action?  or just check if the card is in inventory?
        # if we just check, then we don't need this action at all
        # self.add_action(SwipeCard)
    
    def get_description(self):
        return "Rhett"
# added using concept from OILCAN.PY
class UseRhett(Action):
    def __init__(self):
        Action.__init__(self, "use_dog")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Use Rhett"
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "post"
# only works in ballroom . **Do I add cutscene?
    def do_action(self,game,room,request):
        if self.item.has_dog:
            if room.get_id() == 'ballroom':
                
                    set_cutscene("You gained access to the Ballroom")
                    #self.item.has_dog = False
                    #room.make_drink = False ?
            else:
    
                set_cutscene("Rhett is getting bored.")
    #you're in the wrong room and rhett is useless
                
        else:
    
            set_cutscene("What exactly are you trying to do?")
        return